import plantBase
import peaBullet
from data import *

class Pea(plantBase.PlantBase):
    def __init__(self,surface,pos) :
        path = data.get('pea').get('grow').get('imagePath')
        size = data.get('pea').get('grow').get('size')
        gap = data.get('pea').get('gap')
        summonTime = data.get('pea').get('summonTime')
        super().__init__(surface,path,size,pos,gap,summonTime)

    def summon(self):
        summon = None
        if super().checkSummon():
            super().summon()
            summon = peaBullet.PeaBullet(self.surface,[self.pos[0]+50,self.pos[1]+10])
        return summon



